<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <input type="button" value="添加bai" id="add" />
<script>
    window.onload = function () {
    var addButton = document.getElementById('add');
    addButton.onclick = function () {
    var oDiv = document.createElement('div');
    oDiv.innerHTML = '<input type="text" />';
    document.body.appendChild(oDiv);
}
};
</script> 
</head>
<body>
    
</body>
</html>